# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=libgudev
pkgver=237
pkgrel=1
pkgdesc="GObject-based wrapper library for libudev"
url="https://wiki.gnome.org/Projects/libgudev"
arch="all"
license="LGPL-2.1-or-later"
makedepends="meson glib-dev gobject-introspection-dev eudev-dev vala"
subpackages="$pkgname-dev $pkgname-dbg"
source="https://download.gnome.org/sources/libgudev/$pkgver/libgudev-$pkgver.tar.xz"

build() {
	# Tests require testing/umockdev
	abuild-meson \
		-Dtests=disabled \
		-Dintrospection=enabled \
		-Dvapi=enabled \
		-Dgtk_doc=false \
		. output
	meson compile ${JOBS:+-j ${JOBS}} -C output
}

check() {
	meson test --no-rebuild -v -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
2d68981e3ba5c58ee080b6ed5cd5152c1c352b2bdb3ecb5eaf2b91f6800d3369121222a7fe4f82630aabd164069ee7276c52082b2fc2ff5f318481b85b25abc6  libgudev-237.tar.xz
"
